package test00.lx05.test04;

import java.rmi.registry.Registry;
import java.util.function.Predicate;
import java.util.regex.Pattern;

/**
 * @author CSY
 * @date 2025 - 04 - 07
 */
public class MainTest {
    public static void main(String[] args) {
        Predicate<String> predicate = (str) -> Pattern.compile("^[^@]{5,}@[^\\\\s@]+$").matcher(str).find();
        if (predicate.test("31306@96997@qq.com")){
            System.out.println("邮箱格式正确");
        }else{
            System.out.println("邮箱格式不正确");
        }
    }
}
